using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace PeoplesJukebox.Core.Configuration
{
    /// <summary>
    /// Configuration settings for a track to be played
    /// </summary>
    public class Track : ConfigurationElement
    {
        /// <summary>
        /// Gets/sets the name of the track
        /// </summary>
        [ConfigurationProperty(Track.SettingName.TrackName)]
        public string TrackName
        {
            get { return (string)this[SettingName.TrackName]; }
            set { this[SettingName.TrackName] = value; }
        }

        /// <summary>
        /// Gets/sets the position of the track in the playing order
        /// </summary>
        [ConfigurationProperty(Track.SettingName.Position)]
        public int Position 
        {
            get { return (int)this[SettingName.Position]; }
            set { this[SettingName.Position] = value; }
        }

        /// <summary>
        /// Constants for indexing settings
        /// </summary>
        private struct SettingName
        {
            public const string TrackName = "trackName";
            public const string Position = "position";
        }
    }
}
